gtkwindow: claim the press sequence when clicking on the titlebar
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 7 Nov 2014 11:55:52 +0000 (12:55 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 7 Nov 2014 12:54:10 +0000 (13:54 +0100)
This event might not have an action yet, but certainly accounts, and
should be triggering recognition.

This fixes a crash when attempting to drag CSD windows through touch. As
since cfaec2d2f542, gtk_gesture_single_get_current_sequence() would
rightfully return NULL if the gesture didn't enter recognition, making
event lookup fail.

gtk/gtkwindow.c

index 8c07e21f58d5c36c401c10feaf5daecfefee6d3a..d57b3a438f26a5ef1b065d46a3f3129852c1fe72 100644 (file)
@@ -1473,6 +1473,9 @@ multipress_gesture_pressed_cb (GtkGestureMultiPress *gesture,
         gtk_window_titlebar_action (window, event, button, n_press);
       if (n_press == 1)
         priv->drag_possible = TRUE;
+
+      gtk_gesture_set_sequence_state (GTK_GESTURE (gesture),
+                                      sequence, GTK_EVENT_SEQUENCE_CLAIMED);
       break;
     default:
       if (!priv->maximized)